package com.ruoyi.demo.controller;

import com.ruoyi.demo.domain.vo.roomSelectVo;
import com.ruoyi.demo.util.ResultUtil;
import com.ruoyi.demo.service.IRoomUsageService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

//11
@RestController
@RequestMapping("/demo/roomUsage")
public class RoomUsageController {
    @Resource
    IRoomUsageService iRoomUsageService;
    @GetMapping("/roomSum")
    public ResultUtil getRoomSum(){
        return new ResultUtil(true,iRoomUsageService.getRoomSum());
    }

    @GetMapping("/todayReserveCount")
    public ResultUtil getTodayReserveCount(){
        return new ResultUtil(true,iRoomUsageService.getTodayReserveCount());
    }

    @GetMapping("/roomUsageRate")
    public ResultUtil getRoomUsageRate(){
        return new ResultUtil(true,iRoomUsageService.getRoomUsageRate());
    }

    @GetMapping("/thisMonthReserveSum")
    public ResultUtil getThisMonthReserveSum(){
        return new ResultUtil(true,iRoomUsageService.getThisMonthReserveSum());
    }

    @GetMapping("/roomList")
    public ResultUtil getRoomList() {
        return new ResultUtil(true,iRoomUsageService.getRoomList());
    }
}
